Skip to content

Add merge insertion sort #2211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from Jul 20, 2020
Merged

Add merge insertion sort #2211

merged 10 commits into from Jul 20, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 17, 2020

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

Wikipedia URL

https://en.wikipedia.org/wiki/Merge-insertion_sort

I did black and flake 8 process.

Copy link
Member

@ruppysuppy ruppysuppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the wikipedia url in the file as a comment or in the docstring

@ghost
Copy link
Author

ghost commented Jul 18, 2020

@ruppysuppy
thank you for reviewing.

Add the wikipedia url in the file as a comment or in the docstring

fixed here
50c4185

ryuta69 and others added 3 commits July 18, 2020 22:31
@ghost
Copy link
Author

ghost commented Jul 18, 2020

@cclauss
thank you for reviewing.
I fixed your three requests.

Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request!🤩 Looks good to me. A minor suggestion would be substituting single or odd or something else for surplus (❗ : comments are encouraged too, considering that there aren't many resources on this algorithm).

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TravisBuddy
Copy link

Hey @Ryuta69,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: a02fb0a0-c92e-11ea-ac34-c150448e8ecf

@ghost
Copy link
Author

ghost commented Jul 18, 2020

@poyea

substituting single or odd or something else for surplus

Fixed here ad92692

comments are encouraged too

Added here f0d1215. If this comment is too long, please tell me, I will fix.

@itsvinayak itsvinayak merged commit 9ec71cb into TheAlgorithms:master Jul 20, 2020
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
* Add merge insertion sort

* Fix python naming conventions

* Add wikipedia link

* Add type hint

* Fix python to python3

Co-authored-by: Christian Clauss <[email protected]>

* Refactor doubled process in if-condition into one outside of if-condition

Co-authored-by: Christian Clauss <[email protected]>

* Refactor make python3 prior to python

Co-authored-by: Christian Clauss <[email protected]>

* Fix name of is_surplus into has_last_odd_item

* Add comment

* Fix long comment to shorten

Co-authored-by: Christian Clauss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants